package com.zzgc.modules.param;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.zzgc.common.entity.StudentArchives;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 下载学校检测数据的模板
 * @Author:
 * @CreateTime: 2022-12-09  10:44
 * @Description:
 * @Version: 1.0
 */
@Data
public class StudentParamTemplate implements Cloneable{
    private Long aid;
    @ExcelProperty("学号")
    private String studentNum;
    @ExcelProperty("姓名")
    private String name;
    @ExcelProperty("性别")
    private String sex;
    @ExcelProperty("出生日期")
    @DateTimeFormat("yyyy-MM-dd")
    private Date birthday;
    @ExcelProperty("手机号")
    private String mobile;
    @ExcelProperty("身份证号")
    private String idCard;
    @ExcelProperty("学校")
    private String schoolName;
    @ExcelProperty("学年")
    private String year;
    @ExcelProperty("年级")
    private String gradeName;
    @ExcelProperty("班级")
    private String className;
    @ExcelProperty("OK镜")
    private String okMirror;

    @ExcelProperty("测试时间")
    @DateTimeFormat("yyyy-MM-dd hh:mm:ss")
    private Date checkTime;

    // 标示左右眼部位
    private String eye;

    /**
     * 左右眼裸眼视力
     */
    private String rightEyeVisual;
    private String leftEyeVisual;
    /**
     * 左右眼戴镜视力
     */
    private String rightGlassVisual;
    private String leftGlassVisual;
    /**
     * 左右眼球镜
     */
    private String rightMirror;
    private String leftMirror;

    /**
     * 左右眼柱镜
     */
    private String columnLeft;
    private String columnRight;
    /**
     * 左右眼轴位
     */
    private String leftAxial;
    private String rightAxial;
    /**
     * 左右眼等效球镜
     */
    private String leftEquivalentMirror;
    private String rightEquivalentMirror;
    /**
     * 瞳距
     */
    private String pupilDistance;

    @Override
    public StudentParamTemplate clone() {
        StudentParamTemplate c = null;
        try {
            c = (StudentParamTemplate) super.clone();
            c.setColumnRight(c.getColumnLeft());
            c.setRightMirror(c.getLeftMirror());
            c.setRightGlassVisual(c.getLeftGlassVisual());
            c.setRightEyeVisual(c.getLeftEyeVisual());
            c.setRightEquivalentMirror(c.getLeftEquivalentMirror());
            c.setRightAxial(c.getLeftAxial());
            return c;
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return c;
    }
}
